<template>
  <div class="home">
    <div class="home-top">
      <div class="home-top-Top">
        <h3>
          首页
        </h3>

          <van-icon name="chat-o" size="25" />

      </div>
      <div class="home-top-middle">
        <div class="home-top-middle-doctor">
          <div class="home-middle-doctor-left">
            <van-image
              round
              width="1.2rem"
              height="1.2rem"
              src="https://img01.yzcdn.cn/vant/cat.jpeg"
            />
          </div>
          <div class="home-top-middle-doctor-right">
            <div class="home-middle-doctor-right-top">
              {{doctorInfo.name}}
              {{doctorInfo.duty}}
          </div>
          <div class="home-top-middle-doctor-right-bottom">
            {{doctorInfo.hospital}}
          </div>
          </div>
        </div>
        <div class="renzhen">
          <van-button type="info" size="mini">已认证</van-button>
        </div>
      </div>
      <div class="home-top-bottom">
        评价
      </div>
    </div>
  </div>
</template>

<script>
import { getDoctor } from '@/api/doctor'
export default {
  name: 'Home',
  data() {
    return {
      doctorInfo: {},
    }
  },
  created() {
    getDoctor()
      .then(
        data => {
          this.doctor = data
        },
      )
  },
}
</script>

<style lang="scss">

.home{
  width: 100%;
  height: 100%;

}
.home-top{
  height: 500px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;

  background-color: skyblue;
  &-Top{
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    h3{
      font-weight: 400;
    }
  }
  &-middle{
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    &-doctor{
      display: flex;
      justify-content: space-between;
    }
  }
  &-bottom{
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
  }
}
</style>
